import ResourcesIndex from '@/views/documents/index';
import DocsShow from '@/components/spaces/resources-v2/show';
import DocsUploadShow from '@/views/documents/show/uploads';
import DocsCreate from '@/components/spaces/resources-v2/create';
import DocsUploadConfirm from '@/views/documents/create/upload-doc-confirm';
import DocsUpdate from '@/components/spaces/resources-v2/update';
import DocsSearch from '@/components/spaces/resources-v2/search';

export default [
  {
    path: 'resources/search',
    component: DocsSearch,
  },
  {
    path: 'resources/new',
    component: DocsCreate,
    name: DocsCreate.name,
    meta: { requireAuth: true },
  },
  {
    path: 'resources/upload-confirm',
    component: DocsUploadConfirm,
    name: DocsUploadConfirm.name,
    meta: { requireAuth: true },
  },
  {
    path: 'resources/:folderId?',
    component: ResourcesIndex,
  },
  {
    path: 'resources-docs/:docId',
    component: DocsShow,
    name: DocsShow.name,
  },
  {
    path: 'resources-uploads/:docId',
    component: DocsUploadShow,
    name: DocsUploadShow.name,
  },
  {
    path: 'resources-docs-edit/:docId',
    component: DocsUpdate,
    name: DocsUpdate.name,
    meta: { requireAuth: true },
  },
];
